{  Statement: http://acmp.ru/?main=task&id_task=43
   Verdict: Accepted
}
uses
    SysUtils, Math;

var
    ans,cur,i,ls:longint;
    s:string;

begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(s);
ls := length(s);
cur := 0;
ans := 0;
for i:=1 to ls do begin
    if s[i] = '0' then inc(cur);
    if (s[i] = '1') or (i = ls) then begin
        ans := max(ans, cur);
        cur := 0;
    end;
end;
write(ans);
end.